function time(date,end) {
    if(!date || typeof date==='string')return date
    let y = date.getFullYear()
    let m = date.getMonth() + 1
    m = m < 10 ? '0' + m : m
    let d = date.getDate()
    d = d < 10 ? ('0' + d) : d
    if(end) {
      Number(d)
      d++
      d = d < 10 ? ('0' + d) : d
    }
    var now = y+'-'+m+'-'+d 
    return now
}

export default {
  time
}
